<template>
  <div class="search">

   

    <!-- 头部 -->
    <serHeader></serHeader>

    <!-- 轮播图 -->
    <van-swipe :autoplay="3000">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img v-lazy="image" width="355px" height="200px" cover />
      </van-swipe-item>
    </van-swipe>



      <!-- 图标轮播图 -->
    <iconList></iconList>



      <!-- 推荐歌单 -->
    <recommendMusic></recommendMusic>





  </div>
</template>

<script>
import iconList from '@/components/search/iconlist.vue'
import serHeader from '@/components/search/header.vue'
import recommendMusic from '@/components/search/recommendMusic.vue'
import * as api from "@/api/getmusic";
export default {
  data() {
    return {
      images: [],
    };
  },

  components:{
      iconList,
      serHeader,
      recommendMusic
  },
  mounted() {
    api.getbanner1(2)
    .then((res) => {
      // console.log(res);
      res.data.banners.map((item) => {
        this.images.push(item.pic);
      });
    });
  },
};
</script>

<style  >


.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
.van-swipe-item {
  overflow: hidden;
}
.van-swipe-item img {
  padding: 10px;

  border-radius: 20px;
}
.myinp{
  background: #ccc;
  height: 40px;
  border-radius: 20px;
}
.myinp input::-webkit-input-placeholder{
    position: absolute;
    left: 100px;
    top: 3px;
}
.myinp input {
  outline-style: none;
  outline: none;
  border-width: 0;
  width: 230px;
  background: rgba(242, 239, 239, 0.97); 
  height: 40px;
  border-radius: 20px;

}
.header{
  display: flex;
  align-items: center;
  
}
.van-swipe__indicators{
  margin: 10px;
}
.van-swipe__indicator{
  font-size: 10px!important;
  background: white;
}
</style>